package com.daijia.entity.drive;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.daijia.entity.IdEntity;
import com.daijia.entity.account.Account;
import com.daijia.entity.location.Address;
import com.daijia.entity.location.ServingArea;
import com.daijia.entity.price.Pricing;
import com.daijia.entity.score.Rate;

public class Driver extends IdEntity {

	@Column (name = "title")
	private String title;
	@Column (name = "short_description")
	private String short_description;
	@Column (name = "gender")
	private String gender;
	@Column (name = "image")
	private String image;
	@Column (name = "phone")
	private String phone;
	@Column (name = "mobile")
	private String mobile;
	@Column (name = "status")
	private String status;
	@Column (name = "level")
	private String level;
	@Column (name = "invoiceable")
	private boolean invoiceable;
	@Column (name = "opening_time")
	private Date opening_time;
	@Column (name = "create_time")
	private Date create_time;
	@Column (name = "modify_time")
	private Date modify_time;
	
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "account_ref")
	private Account account;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "address_ref")
	private Address address;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "price_ref")
	private Pricing pricing;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "rate_ref")
	private Rate rate;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "serving_area_ref")
	private ServingArea serveArea;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getShort_description() {
		return short_description;
	}
	public void setShort_description(String short_description) {
		this.short_description = short_description;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getImage() {
		return image;
	}
	public void setImage(String image) {
		this.image = image;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public boolean isInvoiceable() {
		return invoiceable;
	}
	public void setInvoiceable(boolean invoiceable) {
		this.invoiceable = invoiceable;
	}
	public Date getOpening_time() {
		return opening_time;
	}
	public void setOpening_time(Date opening_time) {
		this.opening_time = opening_time;
	}
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public Date getModify_time() {
		return modify_time;
	}
	public void setModify_time(Date modify_time) {
		this.modify_time = modify_time;
	}
	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}
	public Address getAddress() {
		return address;
	}
	public void setAddress(Address address) {
		this.address = address;
	}
	public Pricing getPricing() {
		return pricing;
	}
	public void setPricing(Pricing pricing) {
		this.pricing = pricing;
	}
	public Rate getRate() {
		return rate;
	}
	public void setRate(Rate rate) {
		this.rate = rate;
	}
	public ServingArea getServeArea() {
		return serveArea;
	}
	public void setServeArea(ServingArea serveArea) {
		this.serveArea = serveArea;
	}
	
	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
